/*
 * @Description:
 * @Version: 2.0
 * @Autor: wiz
 * @Date: 2023-05-08 08:28:24
 * @LastEditors: wiz
 * @LastEditTime: 2023-05-08 09:21:40
 */
// {"mode":"flatTree","tableName":"_sys_fun","fields":["_sys_fun_group_id"],"options":null,"filter":[]}
import lexicon from '@/lib/lexicon';
import { T_stdReq } from './base/stdReq';

export class T_getTreeDataArg extends T_stdReq {
  private url: string = lexicon.url.getTreeGrid;

  reportPlanId: number;

  mode: string;

  fields: Array<string>;

  options: object;

  filter: object;

  constructor() {
    super();
    this.fields = [];
    this.options = {};
    this.filter = {};
  }

  public setMode(p: string): T_getTreeDataArg {
    this.mode = p;
    return this;
  }

  public setFields(...p: string[]): T_getTreeDataArg {
    this.fields.push(...p);
    return this;
  }

  public setOptions(p: object): T_getTreeDataArg {
    this.options = p;
    return this;
  }

  public setFilter(p: object): T_getTreeDataArg {
    this.filter = p;
    return this;
  }

  public setReportPlanId(p: number): T_getTreeDataArg {
    this.reportPlanId = p;
    return this;
  }
}
export interface I_getTreeDataArg extends T_getTreeDataArg {}
